<?php
namespace jy_scrmtask;
defined('BY_JYA') or exit('error');
/*
	任务
*/
class task extends \plugin{
	/*
		任务通知
	*/
	public function genjin(){
		$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
		$hour=date('H');
		$linelog=pdo_getall('jy_scrmtask_list',array('tixin_hour like'=>'%'.$hour.'%','tixin_type'=>1,'send_time <='=>$daytime,'status'=>1));
		if($linelog){
			foreach($linelog as $lv){
				$this->model('model')->send_task($lv['id'],true);
			}
		}
		return true;
	}
}